﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PwdMgr.CommonContract;

namespace PwdMgr.DataAccess
{
    public interface IDataAccess : IDisposable
    {
        void CreateUserInfo(UserInfo userInfo);
        int QueryUserInfoCount(string username);
        int QueryUserInfoCount(string username, string password);
        void CreateSensitiveInfo(SensitiveInfo info);

        /// <summary>
        /// Delete info by id.
        /// </summary>
        /// <param name="id"></param>
        /// <returns>The rows affected</returns>
        int DeleteSensitiveInfo(int id);
        UserInfo GetUser(string username, string password);
        List<SensitiveInfo> GetSensitiveInfoByUID(int uid);

        List<SensitiveInfo> GetSensitiveInfo(string tag, int uid);

        int Insert(string table, string[] columns,
            object[] values);
    }
}
